// LongPaperPrinterDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include <afxmt.h>
class CSystemTray;
class InstanceChecker;
class RunGSPrinter;
class CPrinterTypeList;
// CLongPaperPrinterDlg dialog
class CLongPaperPrinterDlg : public CDialog
{
// Construction
public:
	CLongPaperPrinterDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_LONGPAPERPRINTER_DIALOG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


private:
	void FillPrinterTypeList();
	void FillPrinterList();
	void FillColorSpaceList();
	void UpdateButtonsSate(BOOL);
    RunGSPrinter* m_pGSPrinter;
	BOOL m_bSoftDogEnabled;
// Implementation
protected:
	HICON m_hIcon;
	BOOL m_bPrintDirectly;
	CComboBox m_cmbColorSpace;
	CComboBox m_cmbPrinter;
	CComboBox m_cmbPrinterType;
	CComboBox m_cmbQulity;
	CString m_strOutputPrinter;
	CString m_strDefaultType;
	CString m_strDefaultColorSpace;
	int m_nDefaultQulity;
	CStringList m_strFileList;
	InstanceChecker* m_pInstanceChecker;
	CSystemTray* m_pSystemTray;
	CPrinterTypeList* m_pPrinterList;
	CMutex m_mutexFileList;
	void AddFilenameToList(const CString& filename);
	CString GetFilennameFromList();
	BOOL IsFileListEmpty();
	void PrintFile(const CString& strFilename, BOOL bToFile = FALSE);
	CString ParseCommondLine(const CString& strCommandLine);

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg LRESULT OnTrayNotification(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnPrintNewFile(WPARAM wParam, LPARAM lParam);
	afx_msg void OnSystemtrayExit();
	afx_msg void OnDestroy();
	afx_msg BOOL OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct);
	afx_msg void OnBnClickedCheckDirectly();
	afx_msg void OnCbnSelchangeComboPrinter();
	afx_msg void OnBnClickedButtonPrint();
	afx_msg void OnCbnSelchangeComboPrntype();
	afx_msg void OnCbnSelchangeComboColorSpace();
	afx_msg void OnBnClickedDiscard();
	afx_msg void OnBnClickedButtonTofile();
};
